import React,{Component,Fragment} from 'react';
import './home.css';
import TabBar from '../../commponents/TabBar/tabBar'
import SearchBar from './searchBar'
import Slider from './Slider'
import HomeMenu from './HomeMenu';
import NoticeSlider from './NoticeSlider'
import GoodsShow from '../../commponents/GoodsShow/GoodsShow'
import GoodsLists from '../../commponents/GoodsLists/GoodsLists'
import FreshFruits from '../../commponents/FreshFruits/FrashFruits'
export default class Home extends Component{
    render(){
        // console.log(this.props.location.query)
        let city = this.props.location.query;
        if(city == undefined){
            city = '北京'
        }else{
            city = this.props.location.query
        }
        return(
            <Fragment>
                <SearchBar 
                    city={city}
                />
                <Slider />
                <HomeMenu />
                <TabBar />
                <NoticeSlider />
                {/*活动区与商品展示*/}
                <GoodsShow />
                <GoodsLists />
                <FreshFruits />
                <div className='home-footer'>
                    <p>沪IPC备09008015号</p>
                    <span>made By Wujian</span>
                </div>
            </Fragment>
        )
    }
}